﻿#ifndef LOCAL_SERVER_H
#define LOCAL_SERVER_H
#pragma execution_character_set("utf-8")
#include <QMap>
#include <QLocalServer>
#include <local_socket.h>
#include <QWeakPointer>
#include <handle_manage.h>
#include <common.h>
class local_server : public QLocalServer
{
    Q_OBJECT
public:
    local_server(QString listen_name);
    QString listen_name;
    bool start_server();
    void set_handle(QWeakPointer<handle_manage> handlemanage);
private:
    QWeakPointer<handle_manage> handlemanage;
private slots:
    void delete_localSocket();
protected:
    void incomingConnection(quintptr socketDescriptor);
signals:
    void restart_localcaculate();
};

#endif // LOCAL_SERVER_H
